package com.easygo.service.impl;

import com.easygo.mapper.ContentCategoryMapper;
import com.easygo.service.IContentCategoryService;
import com.xuexi.easygo.pojo.ContentCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ContentCategoryServiceImpl implements IContentCategoryService {

    @Autowired
    ContentCategoryMapper categoryMapper;
    @Override
    public Integer getTotalCount(Map<String, Object> maps) {
        return categoryMapper.getTotalCount(maps);
    }

    @Override
    public List<ContentCategory> getContentCategoryPages(Map<String, Object> map) {
        return categoryMapper.getContentCategoryPages(map);
    }

    @Override
    public int addContentCategory(ContentCategory category) {
        return categoryMapper.addContentCategory(category);
    }

    @Override
    public int updateContentCategory(ContentCategory category) {
        return categoryMapper.updateContentCategory(category);
    }

    @Override
    public int deleteContentCategory(Integer id) {
        return categoryMapper.deleteContentCategory(id);
    }

    @Override
    public ContentCategory getById(Integer id) {
        return categoryMapper.getById(id);
    }

    @Override
    public List<ContentCategory> getContentCategory() {
        return categoryMapper.getContentCategory();
    }
}
